#include "cpu/exec/template-start.h"

#define instr lods

make_helper(concat(lods_, SUFFIX)) {
    DATA_TYPE val = MEM_R(cpu.esi);
    REG(R_EAX) = (DATA_TYPE)val;   
    cpu.esi += (cpu.eflags.DF ? -DATA_BYTE : DATA_BYTE);

    print_asm("lods" str(SUFFIX) " %%ds:(%%esi)");
    return 1;
}

#include "cpu/exec/template-end.h"
